package start.doubudouyin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import start.doubudouyin.entity.Adminregister;
import start.doubudouyin.service.AdminregisterService;
import start.doubudouyin.mapper.AdminregisterMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 38798
* @description 针对表【adminregister(管理员注册审核表)】的数据库操作Service实现
* @createDate 2025-05-30 10:57:49
*/
@Service
public class AdminregisterServiceImpl extends ServiceImpl<AdminregisterMapper, Adminregister>
    implements AdminregisterService{
    @Resource
    private AdminregisterMapper adminregisterMapper;

    public String isPhoneExist(String phone) {
        if(adminregisterMapper.isPhoneExist(phone)!=null){
            return phone;
        }else{
            return null;
        }
    }
    public String isIdcardExist(String idcard){
        if(adminregisterMapper.isIdcardExist(idcard)!=null){
            return idcard;
        }else{
            return null;
        }
    }
    public Integer AdminRegisterSubmit(Adminregister adminregister){
        return adminregisterMapper.AdminRegisterSubmit(adminregister);
    }
    public Integer isPass(String phone){
        return adminregisterMapper.isPass(phone);
    }

    public Integer AdminRegisterOut(Integer registerId){//将审核状态改为审核不通过
        return adminregisterMapper.AdminRegisterOut(registerId);
    }
    public Adminregister getRegisterInfo(Integer registerId){//根据registerId获取所有信息
        return adminregisterMapper.getRegisterInfo(registerId);
    }
    public Integer deleteRegisterInfo(Integer registerId){//根据registerId删除注册信息
        return adminregisterMapper.deleteRegisterInfo(registerId);
    }
   public List<Adminregister> getRegisterInfoByPassStatus(Integer passStatus){//根据审核状态获取全部审核信息
        return adminregisterMapper.getRegisterInfoByPassStatus(passStatus);
   }


}




